[Sqlserver] database custom split string function split ()
We often use string splitting when using batch operations. The depressing thing is that SQL server does not have its own split function, so we can only solve it by ourselves. In order to
Topic 1: give a one-dimensional array A, size n, the absolute value of the difference between adjacent elements is 1. such as a = [1, 0, 1, 2, 3, 2, 1, 2, 3], now given a and target find Num. Please find the position of NUM in the array.Topic 2: on
BMAlgorithmIs a better pattern matching algorithm. Generally, if the length of the pattern string is not considered, an algorithm with time complexity O (n) should be optimal, but this is not the case. The BM algorithm can achieve more efficient
5.3 Log ReplicationOnce a leader has been elected, it begins servicing client requests. Each client request contains a command to being executed by the replicated state machines. The leader appends the command to their log as a new entry, then
BM
Algorithm Like the KMP algorithm, it also constructs an auxiliary pattern function to accelerate the matching speed. Compared with the KMP mode function, the BM mode function is simpler:
Void make_next (const char P [], int next []){
Recently in a three-dimensional topology of the power system, using LineSegment to draw the connection between the device cable. In order to make the picture more vivid, it is necessary to add particle moving effect on the line to simulate the flow
Test Cases & Test suitesGive me a chestnut:
Write the Mystack class simulation stack, and test case writing test;
Write the file deletion method and delete the test. No more demos, poke this get
Copy Code code as follows:
--Create a function with two parameters in the function
Create FUNCTION [dbo]. [Splittotable]
(
@SplitString nvarchar (max),--the string entered
@Separator nvarchar (10) = ' '--segmentation condition
)
--The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.